// components/recommend-list/recommend-list.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    hotlist:{
      type:Array,
      value:[]
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
  
  },
  lifetimes:{
    attached(){
      const currentPage = getCurrentPages().pop()
      console.log(currentPage);
      this.setData({isindex:currentPage.route==='pages/index/index'})
    }
  },

  /**
   * 组件的方法列表
   */
  methods: {
    godetail(e){
    // console.log(e.mark.id);
    if(this.data.isindex){
      wx.navigateTo({
        url: '/pkgArticle/pages/detail/detail?id='+e.mark.id,
      })
    }
    }
  }
})
